package com.cicoding.controller;

import com.cicoding.request.GenerateRequest;
import com.cicoding.service.ProblemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Set;

/**
 * @Author:chandfy
 * @Description:
 * @Date:2022/12/8
 */
@RestController
@RequestMapping("problem")
public class ProblemController {
    @Autowired
    private ProblemService problemService;
    @PostMapping("gene")
    public Set<String> geneProblem(@RequestBody GenerateRequest generateRequest){
        Set<String> problem = problemService.generate(generateRequest);
        return problem;
    }
}
